<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
            `${表达式}`
            表达式 -> 变量，运算符，函数调用
        */



        let a = 10;
        let str= ` 
            <ul>
                <li>${a}</li>
                <li>${10<5?`${a}`:'哈哈'}</li>
                <li>${10+20}</li>
                <li>${'a'+'b'}</li>
                <li>${fn()}</li>
            </ul>`;
        console.log(str);


        function fn(){
            return '测试';
        }
    </script>
</body>
</html>